package com.moco.launcher.view;



import com.moco.launcher.R;

import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

public class ShutDownDialog extends Dialog {
	public ShutDownDialog(Context context, String strMessage) {
		this(context, R.style.Dialog_Fullscreen, strMessage);
	}
//R.style.CustomProgressDialog
	public ShutDownDialog(Context context, int theme, String strMessage) {
		super(context, theme);
		this.setContentView(R.layout.shutdown);
		
		 
		TextView tvMsg = (TextView) this.findViewById(R.id.id_tv_loadingmsg);
		if (tvMsg != null) {
			tvMsg.setText(strMessage);
		}
	}

	@Override
	public void onWindowFocusChanged(boolean hasFocus) {

		if (!hasFocus) {
			dismiss();
		}
	}
	
}